var cesiumvideo = {
    // sourceurl: 'http://192.168.146.131:8000/hls/test.m3u8'
    sourceurl: '../../plugin/vide7.4.1/oceans.mp4'
    // sourceurl: 'http://192.168.1.155:811/test'
};
cesiumvideo.uuid = function uuid(len, radix) {
    var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
    var uuid = [], i;
    radix = radix || chars.length;

    if (len) {
        // Compact form
        for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix];
    } else {
        // rfc4122, version 4 form
        var r;

        // rfc4122 requires these characters
        uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
        uuid[14] = '4';

        // Fill in random data.  At i==19 set the high bits of clock sequence as
        // per rfc4122, sec. 4.1.5
        for (i = 0; i < 36; i++) {
            if (!uuid[i]) {
                r = 0 | Math.random() * 16;
                uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r];
            }
        }
    }

    return uuid.join('');
}
cesiumvideo.getEl = function () {
    var id = 'video' + cesiumvideo.uuid(8, 16);

    var newVideo = document.createElement("div");//创建一个标签		
    newVideo.style = 'width:640px; height:320px';
    newVideo.innerHTML = '<video mouted preload  id=' + id + '  class="video-js vjs-default-skin" style="display: block;" controls autoplay width="640" ' +
        'height="320" data-setup="{}">' +
        // '<source src="' + cesiumvideo.sourceurl + '" type="application/x-mpegURL" />' +
        // '<source src="http://vjs.zencdn.net/v/oceans.webm" type="video/webm">' +
		// '<source src="http://vjs.zencdn.net/v/oceans.ogv" type="video/ogg">'+ 
        '<source src="' + cesiumvideo.sourceurl + '" type="video/mp4" />' +
        '</video>';
        
    //newVideo.innerHTML = '<video id="'+id+'" src="'+cesiumvideo.sourceurl+'" type="video/ogg" class="videoTable" width="100%;" autoplay="autoplay" controls="controls" loop="loop"><video>';


    var Fid = document.body;//通过id号获取newVideo的父节点（也就是上一级的节点）
    Fid.appendChild(newVideo);//把创建的节点newVideo添加到父节点中；

    var el = document.getElementById(id);

    // el.onloadstart = function () {
    //      el.play();
    // }
    // el.play();
    return el;
}